<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    @include('public.h5_head')
    <title>查询结果</title>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/rem.js"></script>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/commoncss/common.css"/>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/demand.css"/>
</head>
<script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/iscroll.js"></script>
<script src="{{ env('CDN_DOMAIN_NAME') }}/js/app.js"></script>
<script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/common.js"></script>
<body>
<div id="demand_box">
    <div class="wrap">
        <div class="demand">
            @if(!isset($infos) || count($infos) <= 0)
                <div class="main_empty">
                    <div class="demand_empty">
                        <div class="demand_img">
                            <img src="/img/00013.png" alt="" />
                        </div>
                    </div>
                    <p class="demand_wrods">没有找到账单</p>
                </div>
                @else

            @foreach($infos as $info)
            <ul class="demand_ul">
                <li class="demand_li">
                    <div class="demand_icon">
                        <img src="/img/00004.png" alt="" />
                        <span>{{ $brandName[$info->brand_id] }}</span>
                    </div>
                    <div class="demand_data">
                        <span>购买时间：</span>
                        <span>{{ substr($info->created_at,0,10)  }}</span>
                    </div>
                </li>
                <li class="demand_li">
                    <div class="demand_num">
                        <span>订单编号：</span>
                        <span>{{ $info->ordernum }}</span>
                    </div>
                </li>
                <li class="demand_li">
                    <div class="demand_design">
                        <span>款号：</span>
                        <span>{{ $info->girard }}</span>
                    </div>
                    <div class="demand_color">
                        <span>颜色：</span>
                        <span>{{ $info->color }}</span>
                    </div>

                </li>
                <li class="demand_li">
                    <div class="demand_sum">
                        <span>数量：</span>
                        <span>{{ $info->num }}</span>
                    </div>
                    <div class="demand_should">
                        <span>应付：</span>
                        <span style="color:#EA294B;">￥{{ sprintf("%.2f",$info->actual_price + $info->postage_estimate) }}</span>
                    </div>
                </li>
                <li class="demand_li">
                    <div class="demand_actual">
                        <span>实付：</span>
                        <span style="color:#EA294B;">￥{{ sprintf("%.2f",$info->paid) }}</span>
                    </div>
                    <div class="demand_surplus">
                        <span>剩余：</span>
                        <span style="color:#EA294B;">￥{{ sprintf("%.2f",$info->actual_price - $info->paid) }}</span>
                    </div>
                </li>
            </ul>
                @endforeach
            @endif
        </div>
    </div>
    @if(!isset($infos) || count($infos) > 0)
    <div class="demand_out">
        <div class="bottom_total">总计：</div>
        <div class="bottom_should">
            <span>应付金额:</span>
            <span style="color:#EA294B;">￥ {{ sprintf("%.2f",$total['price']) }}</span>
        </div>
        <div class="bottom_actual">
            <span>实付金额:</span>
            <span style="color:#EA294B;">￥ {{ sprintf("%.2f",$total['actual_price']) }}</span>
        </div>
        <div class="bottom_surplus">
            <span>剩余金额:</span>
            <span style="color:#EA294B;">￥ {{ sprintf("%.2f",$total['owe_price']) }}</span>
        </div>
    </div>
        @endif
</div>
<script>
    scroll();
</script>
</body>
</html>
